/**
 * 屏幕工具
 * @author lawrence
 * @date 2019-03-15
 */
import {DeviceInfo, Platform, Dimensions} from "react-native";

const w = Dimensions.get('window').width;
const h = Dimensions.get('window').height;

export function width() {
    return w;
}

export function height() {
    return h;
}

export function isPhoneX() {
    return Platform.OS === 'ios' && DeviceInfo.isIPhoneX_deprecated;
}

export default {
    width,
    height,
    isPhoneX,
}
